<template>
  <div class="dashboard-container">
    <el-button v-permission="['ROLE_SUPERADMIN']" type="success">仪表盘</el-button>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import permission from '@/directive/permission/index.js'
export default {
  name: 'Dashboard',
  directives: {
    permission
  },
  data() {
    return {
      currentRole: 'adminDashboard'
    }
  },
  computed: {
    ...mapGetters([
      'roles'
    ])
  },
  created() {
    if (!this.roles.includes('admin')) {
      this.currentRole = 'editorDashboard'
    }
  }
}
</script>
